fix: validate category refs in CI + fix 4 servers with unknown categories - #119
Merged
Merged
Conversation
…ries
Four server definitions referenced categories not present in
\`categories.json\` (\`web-scraping\`, \`business\`, \`crm\`, \`search-web\`).
These silently failed to sync in the bundler because server_categories
has a FK to categories.id — the upsert threw and dropped the entire
server, so any update to these four files never reached production.
- Fix the four offenders to use valid categories:
ai.suprsonic-mcp-npx web-scraping -> dropped (kept search, ai-ml, communication)
app.businys-mcp-npx business, crm -> productivity, communication
dev.agentdeals-mcp-http business -> productivity
io.global-chat-mcp-npx search-web -> search
- Extend scripts/validate.js to load categories.json and reject any
server that references an ID not listed there. Reports the full list
of valid IDs on failure so contributors can pick the right one.
- Broaden the Validate PR workflow so changes to categories.json,
schemas, scripts, or tests all trigger validation. Added a "Run full
test suite" step so cross-file checks (consistency, categories,
deprecated icon field, logo URL format) run on every PR.
- Fix the one pre-existing \`type: "password"\` test fixture, which was
always invalid under the input schema but went unnoticed because CI
didn't run the test suite.
Verified \`pnpm validate servers/<bad>\` now prints a clear error listing
every valid category ID.
Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four server definitions reference categories that don't exist in `categories.json`. The bundler's `server_categories` table has a foreign key to `categories.id`, so when these servers reach the upsert step the FK throws and the entire row is dropped — meaning any update to those four files never made it to production. CI didn't catch it because schema validation treats `categories` as an opaque string array, and the category-reference check lived only in the test suite, which CI wasn't running.
Data fixes
Validator changes
Test plan
Companion
A separate bundler PR hardens `upsertServer` to skip (with a warning) any unknown category IDs instead of throwing — defense-in-depth so a future drift between `categories.json` here and the `categories` table in D1 can't silently break sync.